//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package imagetoolscommon;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

public class ImageData {
    public BufferedImage image;
    public File file;
    public String filename;
    public String createDir;

    public ImageData() {
    }

    public static ImageData loadFile(File file) throws IOException {
        ImageData imageData = new ImageData();
        imageData.image = ImageIO.read(file);
        imageData.file = file;
        if(imageData.image == null) {
            return null;
        } else {
            imageData.filename = file.getName();
            imageData.createDir = file.getParent();
            return imageData;
        }
    }
}
